// 文章详情 组件，展示整篇文章的内容
// 传入一个 .md 文件
import React from 'react';
import {EyeOutlined,EditOutlined} from '@ant-design/icons';
import { Space } from 'antd';

import style from './ArticleDetail.module.css';


export default function ArticleDetail(props) {
    const {html,data} = props;

    return (

        <>
            <div className={style.article}>

                <div className={style.article_title}>{data.title}</div>
                <div className={style.article_info}>
                    <Space>
                    
                    <EditOutlined />{data.publish_date}&nbsp;&nbsp;
                    <EyeOutlined />{data.view_num}
                    </Space>
                </div>
                <div className={style.article_content} dangerouslySetInnerHTML={{__html:html}}>
                </div>
            </div>
        </>
    )
}